﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UCApprover.ascx.cs" Inherits="YBApproval.UserControls.UCApprover" %>
<script type="text/javascript">    
    var btnObj;
    function selectApprover(obj) {
        var url = "";
        if ($(".approverTable tr").length > 1) {
            url = "../Pages/SelectApprover.aspx?type=user";
        }
        else {
            url = "../Pages/SelectApprover.aspx?type=role";
        }
        btnObj = obj;
        var results = window.showModalDialog(url, "", "dialogWidth:400px;dialogHeight:250px;center:yes;help:no;resizable:no;status:no");
        if (results != null && results != undefined) {
            var resultArray = results.split("|||");
            $(btnObj).next().next().val(resultArray[0]);
            $(btnObj).prev().val(resultArray[1]);
            $(btnObj).next().val(resultArray[2]);            
        }
        else {
            //$(btnObj).prev().val("");
            //$(btnObj).next().val("");
        }
        return false;
    }    
</script>
<fieldset style="width:300px">
<legend>审批人</legend>
<asp:Table ID="ApproverTable" runat="server" CssClass="approverTable">
</asp:Table>
</fieldset>


